package com.ymatou.iapi.productquery.testcase;

import com.shop2cn.iapi.activitymgt.parameter.AddactivityBean;
import com.shop2cn.iapi.agentproducts.parameter.AddAgentProductBean;
import com.shop2cn.iapi.agentproducts.parameter.ImportAgentProductBean;
import com.shop2cn.iapi.agentproducts.parameter.ProductDetailsDto;
import com.ymatou.iapi.productmanager.parameter.product.AddSellerProductRequest;
import com.ymatou.iapi.productprice.parameter.ProductAllPriceBean;
import com.ymatou.iapi.productquery.parameter.ApplyActivityDto;
import com.ymatou.iapi.productquery.parameter.CatalogList.ProductInCartBean;
import com.ymatou.iapi.productquery.parameter.GetCatalogListByCatalogIdListBean;
import com.ymatou.iapi.productquery.service.GetCatalogListByCatalogIdListCall;
import com.ymatou.iapi.productquery.service.GetCatalogListByTradeIsolationCall;
import com.ymatou.iapi.sellerproduct.service.ChangeNewProductInfoCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.tag.P1;
import com.ymttest.business.service.*;
import com.ymttest.database.model.YmtCatalogsI;
import com.ymttest.database.mongo.YmtMongoDriverFactroy;
import com.ymttest.database.mongo.jproduct.ActivityProductsWapper;
import com.ymttest.database.sqlwapper.YmtCatalogsIWapper;
import com.ymttest.utils.AgentUsers;
import com.ymttest.utils.EnvSetup;
import com.ymttest.utils.MapUtil;
import com.ymttest.utils.YMTDateUtil;
import org.json.JSONArray;
import org.json.JSONObject;
import org.junit.*;
import org.junit.experimental.categories.Category;

import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;

public class Ts_GetCatalogListByCatalogIdList {
	private static GetCatalogListByCatalogIdListCall getCatalogListByCatalogIdListCall = new GetCatalogListByCatalogIdListCall();
	private static GetCatalogListByTradeIsolationCall getCatalogListByTradeIsolationCall = new GetCatalogListByTradeIsolationCall();
	
	private static Integer sellerId = Integer.valueOf(EnvSetup.getData("productpriceSellerId"));
	private static String sellerName = EnvSetup.getData("productpriceSellerName");	
	
	private static YmtCatalogsIWapper ymtCatalogsIWapper = new YmtCatalogsIWapper();
	private static ActivityProductsWapper activityProductsWapper = new ActivityProductsWapper();
	//渠道商
	private static int rootUserId = AgentUsers.rootUserId;
	private static String rootUserName = "NickautoTest";
	//渠道商->代理商1
	private static int agentUserId1 = AgentUsers.agentUserId1;
	private static String agentUserName1 = "NickautoTest";

	//vip渠道
	private static int vipRootUserId = AgentUsers.vipRootUserId;
	private static String vipRootUserName = "NickautoTest";
	//vip渠道->代理
	private static int vipAgentUserId1 = AgentUsers.vipAgentUserId1;
	private static String vipAgentUserName1 = "dgsq408897016";
	//vip渠道->代理->代理
	private static int vipAgentUserId2 = AgentUsers.vipAgentUserId2;
	private static String vipAgentUserName2 = "NickautoTest";
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("非交易隔离查询接口, 购物车中商品列表（普通购物车中用）");
		try {
			GodfreightmgrService.deleteBySellerId(rootUserId);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	@Before
	public void caseUp() {
		
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(getCatalogListByCatalogIdListCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}

	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_GetCatalogListByCatalogIdList_001() {
		Logger.start(true,"普通单规格商品，普通单规格直播商品 查询");
		try {
			//发布商品
			AddSellerProductRequest addprodReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String productId = ProductManagerCallServiceV2.addNewProductV2(addprodReq).get("Data").getAsJsonObject().get("ProductId").getAsString();

			//收集catalogs
			List<String> catalogs = ymtCatalogsIWapper.selectCatalogsByProductId(productId).stream().map(ele->ele.getsCatalogId()).collect(Collectors.toList());
			
			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,false);
			
			//check GetCatalogListByTradeIsolation
			checkByCatalogs(catalogs,true);

			//================================================================================
			//加入直播
			int liveId = LiveCallService.createLiveInProgress(sellerName, Integer.valueOf(sellerId)).getJSONObject("Data").getInt("ActivityId");
			SellerProductCallService.addProductInLive(sellerId, liveId, productId);
			
			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,0,0,liveId,false);
			
			//check GetCatalogListByTradeIsolation
			checkByCatalogs(catalogs,0,0,liveId,true);
			
			
			
			//================================================================================
			//结束直播
			LiveCallService.closeLive(liveId, Integer.valueOf(sellerId));
		
			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,0,0,0,false);
			
			//check GetCatalogListByTradeIsolation
			checkByCatalogs(catalogs,0,0,0,true);
			
			
			//================================================================================
			//加入未开始直播
			liveId = LiveCallService.createLiveBeginInFuture(sellerName, Integer.valueOf(sellerId)).getJSONObject("Data").getInt("ActivityId");
			SellerProductCallService.addProductInLive(sellerId, liveId, productId);
			
			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,0,0,0,false);
			
			//check GetCatalogListByTradeIsolation
			checkByCatalogs(catalogs,0,0,0,true);
			
			
		}catch (Exception e) {
			Logger.fail(e);
		}
	}
		
	@Test
	@Category(P1.class)
	@TestCase
	@Ignore
	public void Tc_GetCatalogListByCatalogIdList_002() {
		Logger.start(true, "普通多规格商品,普通多规格直播商品 查询");
		try {
			String productId = ProductQueryCallService.getNewProduct(sellerId, sellerName);
			
			List<String> catalogs = ymtCatalogsIWapper.selectCatalogsByProductId(productId).stream().map(ele->ele.getsCatalogId()).collect(Collectors.toList());
									
			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,false);
			
			//check GetCatalogListByTradeIsolation
			checkByCatalogs(catalogs,true);
			
			//================================================================================
			//加入直播
			int liveId = LiveCallService.createLiveInProgress(sellerName, Integer.valueOf(sellerId)).getJSONObject("Data").getInt("ActivityId");
			SellerProductCallService.addProductInLive(sellerId, liveId, productId);
			
			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,0,0,liveId,false);
			
			//check GetCatalogListByTradeIsolation
			checkByCatalogs(catalogs,0,0,liveId,true);
			
			//暂停销售
			SellerProductCallService.suspendSaleProductInLive(sellerId, liveId, productId);
			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,0,0,0,false);
			
			//check GetCatalogListByTradeIsolation
			checkByCatalogs(catalogs,0,0,0,true);
			
		}catch (Exception e) {
			Logger.fail(e); 
		}
	}
	
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetCatalogListByCatalogIdList_003() {
		Logger.start(true, "普通活动商品查询");
		int activityId = 0;
		try {
			String productId = ProductPriceCallService.getProdPriceWithActivity_NoNewBuyerAndNoIsolation(sellerId).getProductId();
			List<String> catalogs = ymtCatalogsIWapper.selectCatalogsByProductId(productId).stream().map(ele->ele.getsCatalogId()).collect(Collectors.toList());
									
			int inaid = Integer.parseInt(activityProductsWapper.getByProdId(productId).get("inaid").toString());
			activityId = Integer.parseInt(activityProductsWapper.getByProdId(productId).get("aid").toString());
			
			
			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,inaid,0,0,false);
			
			//check GetCatalogListByTradeIsolation
			checkByCatalogs(catalogs,inaid,0,0,true);
			
			
			//结束活动
			//activityProductsWapper.update(inaid, MapUtil.hashMap("end",YMTDateUtil.getBeforeOrNextDate(-1))); 
			AdminCallService.closeProductInActivity(String.valueOf(inaid));
			
			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,0,0,0,false);
			
			//check GetCatalogListByTradeIsolation
			checkByCatalogs(catalogs,0,0,0,true);
			
		}catch (Exception e) {
			Logger.fail(e);
		}finally{
			if (activityId>0){ActivityPoolService.removeActivityIdFromPool(activityId);}
		}
	}
	
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetCatalogListByCatalogIdList_004() {
		Logger.start(true, "交易隔离活动商品查询");
		int activityId = 0;
		try {
			String productId = ProductPriceCallService.getProdPriceWithActivity_NoNewBuyerAndIsolation(sellerId).getProductId();
			List<String> catalogs = ymtCatalogsIWapper.selectCatalogsByProductId(productId).stream().map(ele->ele.getsCatalogId()).collect(Collectors.toList());
									
			int inaid = Integer.parseInt(activityProductsWapper.getByProdId(productId).get("inaid").toString());
			activityId = Integer.parseInt(activityProductsWapper.getByProdId(productId).get("aid").toString());
			
			
			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,0,0,0,false);
			
			//check GetCatalogListByTradeIsolation
			checkByCatalogs(catalogs,inaid,0,0,true);
			
			
			//结束活动
			//activityProductsWapper.update(inaid, MapUtil.hashMap("end",YMTDateUtil.getBeforeOrNextDate(-1))); 
			AdminCallService.closeProductInActivity(String.valueOf(inaid));
			
			
			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,0,0,0,false);
			
			//check GetCatalogListByTradeIsolation
			checkByCatalogs(catalogs,0,0,0,true);
			
			
		}catch (Exception e) {
			Logger.fail(e);
		}finally{
			if (activityId>0){ActivityPoolService.removeActivityIdFromPool(activityId);}
		}
	}
	
	
	@Test
	@Category(P1.class)
	@TestCase
	@Ignore
	public void Tc_GetCatalogListByCatalogIdList_005() {
		Logger.start(true, "活动直播商品查询");
		try {
			String productId = ProductPriceCallService.getProdPriceWithActivity_NoNewBuyerAndNoIsolation(sellerId).getProductId();
			List<String> catalogs = ymtCatalogsIWapper.selectCatalogsByProductId(productId).stream().map(ele->ele.getsCatalogId()).collect(Collectors.toList());
									
			int inaid = Integer.parseInt(activityProductsWapper.getByProdId(productId).get("inaid").toString());
			
			//================================================================================
			//加入直播
			int liveId = LiveCallService.createLiveInProgress(sellerName, Integer.valueOf(sellerId)).getJSONObject("Data").getInt("ActivityId");
			SellerProductCallService.addProductInLive(sellerId, liveId, productId);
			
			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,inaid,0,liveId,false);
			
			//check GetCatalogListByTradeIsolation
			checkByCatalogs(catalogs,inaid,0,liveId,true);
		}catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_GetCatalogListByCatalogIdList_006() {
		Logger.start(true,"普通多规格商品，增加规格");
		try {
			//发布商品
			AddSellerProductRequest addpro = ProductManagerCallServiceV3.initAddSellerProductRequest(sellerId);
			String productId = ProductManagerCallServiceV3.AddSellerProduct(addpro);
			
			List<String> catalogs = ymtCatalogsIWapper.selectCatalogsByProductId(productId).stream().map(ele->ele.getsCatalogId()).collect(Collectors.toList());
			
			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,false);
			
			//check GetCatalogListByTradeIsolation
			checkByCatalogs(catalogs,true);
			
			 
			String fileName = "changenewproductinfocalltpl_003.json";
			new ChangeNewProductInfoCall().callAndGetReturnData(fileName,MapUtil.hashMap("LoginID", sellerName, "UserID", sellerId,"Product->sProductId",productId,"ProductID",productId));

			catalogs = ymtCatalogsIWapper.selectCatalogsByProductId(productId).stream().map(ele->ele.getsCatalogId()).collect(Collectors.toList());
			
			
			YMTDateUtil.waitTime(5);
			
			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,false);
			
			//check GetCatalogListByTradeIsolation
			checkByCatalogs(catalogs,true);
			
			

		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetCatalogListByCatalogIdList_007() {
		Logger.start(true, "普通下一场会员活动商品查询");
		int activityId = 0;
		try {
			String productId = ProductPriceCallService.getProductIdWithAllPrice();
			ProductPriceCallService.getProdPriceWithActivityInFuture(sellerId,productId,MapUtil.hashMap("ActivityTemplateId", 2));
			List<String> catalogs = ymtCatalogsIWapper.selectCatalogsByProductId(productId).stream().map(ele->ele.getsCatalogId()).collect(Collectors.toList());
			
			if (YmtMongoDriverFactroy.IsNewJavaMongoOpen){
				new ActivityProductsWapper().update(productId, MapUtil.hashMap("nbuyer",true,"isolation",false));
			}
			
			
			int inaid = Integer.parseInt(activityProductsWapper.getByProdId(productId).get("inaid").toString());
			activityId = Integer.parseInt(activityProductsWapper.getByProdId(productId).get("aid").toString());
			
			
			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,0,inaid,0,false);
			
			//check GetCatalogListByTradeIsolation
			checkByCatalogs(catalogs,0,inaid,0,true);
			
			//结束活动
			//activityProductsWapper.update(inaid, MapUtil.hashMap("end",YMTDateUtil.getBeforeOrNextDate(1))); 
			AdminCallService.closeProductInActivity(String.valueOf(inaid));
			
			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,0,0,0,false);
			
			//check GetCatalogListByTradeIsolation
			checkByCatalogs(catalogs,0,0,0,true);
			
		}catch (Exception e) {
			Logger.fail(e);
		}finally{
			if (activityId>0){ActivityPoolService.removeActivityIdFromPool(activityId);}
		}
	}
	
	
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetCatalogListByCatalogIdList_008() {
		Logger.start(true, "交易隔离下一场活动商品查询");
		int activityId = 0;
		try {
			String productId = ProductPriceCallService.getProductIdWithAllPrice();
			ProductPriceCallService.getProdPriceWithActivityInFuture(sellerId,productId,MapUtil.hashMap("ActivityTemplateId", 1));
			List<String> catalogs = ymtCatalogsIWapper.selectCatalogsByProductId(productId).stream().map(ele->ele.getsCatalogId()).collect(Collectors.toList());
			
			if (YmtMongoDriverFactroy.IsNewJavaMongoOpen){
				new ActivityProductsWapper().update(productId, MapUtil.hashMap("nbuyer",true,"isolation",true));
			}
			
			int inaid = Integer.parseInt(activityProductsWapper.getByProdId(productId).get("inaid").toString());
			activityId = Integer.parseInt(activityProductsWapper.getByProdId(productId).get("aid").toString());
			
			
			
			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,0,0,0,false);
			
			//check GetCatalogListByTradeIsolation
			checkByCatalogs(catalogs,0,inaid,0,true);
			
			
			//结束活动
			//activityProductsWapper.update(inaid, MapUtil.hashMap("end",YMTDateUtil.getBeforeOrNextDate(1))); 
			AdminCallService.closeProductInActivity(String.valueOf(inaid));
			
			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,0,0,0,false);
			
			//check GetCatalogListByTradeIsolation
			checkByCatalogs(catalogs,0,0,0,true);
			
		}catch (Exception e) {
			Logger.fail(e);
		}finally{
			if (activityId>0){ActivityPoolService.removeActivityIdFromPool(activityId);}
		}
	}
	
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetCatalogListByCatalogIdList_010() {
		Logger.start(true, "普通活动商品查询,活动库存为0");
		int activityId = 0;
		try {
			ProductAllPriceBean productAllPriceBean = ProductPriceCallService.getProdPriceWithActivity_NoNewBuyerAndNoIsolation(sellerId);
			String productId =productAllPriceBean.getProductId();
			List<String> catalogs = ymtCatalogsIWapper.selectCatalogsByProductId(productId).stream().map(ele->ele.getsCatalogId()).collect(Collectors.toList());
									
			int inaid = Integer.parseInt(activityProductsWapper.getByProdId(productId).get("inaid").toString());
			activityId = Integer.parseInt(activityProductsWapper.getByProdId(productId).get("aid").toString());
			
			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,inaid,0,0,false);
			
			//check GetCatalogListByTradeIsolation
			checkByCatalogs(catalogs,inaid,0,0,true);
			
			//活动库存为0 就移到下一场活动
			ProductPriceCallService.updateActivityStockTo0InMgo(productAllPriceBean, inaid);
			//更新商品Reids时间戳
			ProductManagerCallServiceV3.updateProductRedisTimeStamp(productId);
			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,-1*inaid,0,0,false);
			
			//check GetCatalogListByTradeIsolation
			checkByCatalogs(catalogs,-1*inaid,0,0,true);
			
		}catch (Exception e) {
			Logger.fail(e);
		}finally{
			if (activityId>0){ActivityPoolService.removeActivityIdFromPool(activityId);}
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetCatalogListByCatalogIdList_013() {
		Logger.start(true, "普通活动商品查询,活动库存为0");
		int activityId = 0;
		try {
			AddSellerProductRequest addpro = ProductManagerCallServiceV3.initAddSellerProductRequest(sellerId);
			String productId = ProductManagerCallServiceV3.AddSellerProduct(addpro);
			List<String> catalogs = ymtCatalogsIWapper.selectCatalogsByProductId(productId).stream().map(ele->ele.getsCatalogId()).collect(Collectors.toList());
			Date beginTime = YMTDateUtil.parseYMDHMSDate(YMTDateUtil.getBeforeOrNextSecond(-3600));
			Date endTime = YMTDateUtil.parseYMDHMSDate(YMTDateUtil.getBeforeOrNextSecond(3600));
			ApplyActivityDto activityDto = ProductPriceCallService.ApplyHighActivity("10",productId,beginTime,endTime);
			activityId = activityDto.getActivityId();
			int inaid = Integer.parseInt(activityProductsWapper.getByProdId(productId).get("inaid").toString());

			checkByCatalogs(catalogs,inaid,0,0,false);
			checkByCatalogs(catalogs,inaid,0,0,true);

			ProductPriceCallService priceCallService = new ProductPriceCallService();
			priceCallService.updateActivityStockTo0InMgo(inaid);
			//更新商品Reids时间戳
			ProductManagerCallServiceV3.updateProductRedisTimeStamp(productId);

			
			checkByCatalogs(catalogs,inaid*-1,0,0,false);
		}catch (Exception e) {
			Logger.fail(e);
		}finally{
			if (activityId>0){ActivityPoolService.removeActivityIdFromPool(activityId);}
		}
	}


	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetCatalogListByCatalogIdList_011() {
		Logger.start(true, "交易隔离活动商品查询,库存为0");
		int activityId = 0;
		try {
			ProductAllPriceBean productAllPriceBean = ProductPriceCallService.getProdPriceWithActivity_NoNewBuyerAndIsolation(sellerId);String productId =productAllPriceBean.getProductId();
			List<String> catalogs = ymtCatalogsIWapper.selectCatalogsByProductId(productId).stream().map(ele->ele.getsCatalogId()).collect(Collectors.toList());
									
			int inaid = Integer.parseInt(activityProductsWapper.getByProdId(productId).get("inaid").toString());
			activityId = Integer.parseInt(activityProductsWapper.getByProdId(productId).get("aid").toString());
			
			
			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,0,0,0,false);
			
			//check GetCatalogListByTradeIsolation
			checkByCatalogs(catalogs,inaid,0,0,true);
			
			
			//活动库存为0 SellOutActivityBean 赋值
			ProductPriceCallService.updateActivityStockTo0InMgo(productAllPriceBean, inaid);
			ProductManagerCallServiceV3.updateProductRedisTimeStamp(productId);

			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,0,0,0,false);

			//check GetCatalogListByTradeIsolation
			checkByCatalogs(catalogs,-1*inaid,0,0,true);
			
		}catch (Exception e) {
			Logger.fail(e);
		}finally{
			if (activityId>0){ActivityPoolService.removeActivityIdFromPool(activityId);}
	}
	}


	public static void checkByCatalogs(List<String> catalogs,boolean isTradeIsolation) throws Exception{
		checkByCatalogs(catalogs,0,0,0,isTradeIsolation);
	}
	
	
	public static void checkByCatalogs(List<String> catalogs, int prodInActivityId, int prodInNextActivityId,int liveId,boolean isTradeIsolation) throws Exception{
		//mongo库中取值
		YMTDateUtil.waitTime(2);

		//返回值取数据
		List<ProductInCartBean> actProductInCartBeanList = new ArrayList<>();

		JSONObject ret;
		String chkdesc;
		if (isTradeIsolation){
			//交易隔离接口
			ret = getCatalogListByTradeIsolationCall.search(catalogs);
			chkdesc = "检查 GetCatalogListByTradeIsolation";
		}else{

			//普通交易不隔离接口
			ret = getCatalogListByCatalogIdListCall.search(catalogs);
			chkdesc = "检查 GetCatalogListByCatalogIdList";
		}
		List<ProductInCartBean> tgtProductInCartBeanList = new ArrayList<>();
		for(int i=0;i<catalogs.size();i++){
			tgtProductInCartBeanList.add(ProductQueryCallService.getProductInCartBean(catalogs.get(i), prodInActivityId,prodInNextActivityId, liveId));
		}
		Logger.debug("tgtProductInCartBeanList:" + tgtProductInCartBeanList);
		//返回码检查
		Logger.verifyEquals(200, ret.getInt("Code"), "返回码检查");
		
		JSONArray prodList = ret.getJSONObject("Data").getJSONArray("ProductList");
		for(int i=0;i<prodList.length();i++){
			actProductInCartBeanList.add(ProductQueryCallService.getBeanFromJson(prodList.getJSONObject(i),ProductInCartBean.class));
		}
		Logger.debug("actProductInCartBeanList:" + actProductInCartBeanList);
		//返回值比对
		System.out.println("tgt:"+tgtProductInCartBeanList);
		System.out.println("act:"+actProductInCartBeanList);
		
		ProductQueryCallService.compareProductInCartBean(catalogs, tgtProductInCartBeanList, actProductInCartBeanList, chkdesc);

	}

	public static void checkByCatalogsV2(List<String> catalogs) throws Exception{
		//mongo库中取值
		YMTDateUtil.waitTime(2);

		//返回值取数据
		List<ProductInCartBean> actProductInCartBeanList = new ArrayList<>();

		JSONObject ret;
		String chkdesc;

		//普通交易不隔离接口
		ret = getCatalogListByCatalogIdListCall.search(catalogs);
		chkdesc = "检查 GetCatalogListByCatalogIdList";
		List<ProductInCartBean> tgtProductInCartBeanList = new ArrayList<>();
		for(int i=0;i<catalogs.size();i++){
			tgtProductInCartBeanList.add(ProductQueryCallService.getProductInCartBean(catalogs.get(i)));
		}
		Logger.debug("tgtProductInCartBeanList:" + tgtProductInCartBeanList);
		//返回码检查
		Logger.verifyEquals(200, ret.getInt("Code"), "返回码检查");

		JSONArray prodList = ret.getJSONObject("Data").getJSONArray("ProductList");
		for(int i=0;i<prodList.length();i++){
			actProductInCartBeanList.add(ProductQueryCallService.getBeanFromJson(prodList.getJSONObject(i),ProductInCartBean.class));
		}
		Logger.debug("actProductInCartBeanList:" + actProductInCartBeanList);
		//返回值比对
		ProductQueryCallService.compareProductInCartBean(catalogs, tgtProductInCartBeanList, actProductInCartBeanList, chkdesc);

	}



	///////////////////忽略case  /////////////////////
	@Test
	@Category(P1.class)
	@TestCase
	@Ignore
	public void Tc_GetCatalogListByCatalogIdList_012() {
		Logger.start(true, "全球优选商品");
		int activityId = 0;
		try {
			int sellerId = 20336378;
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerGlobalPspProductRequest(sellerId);
			String productId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();

			List<YmtCatalogsI> catalogsIList = new YmtCatalogsIWapper().selectCatalogsByProductId(productId);

			List<String> catalogs = Arrays.asList(catalogsIList.get(0).getsCatalogId(),catalogsIList.get(1).getsCatalogId());
			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,0,0,0,false);

		}catch (Exception e) {
			Logger.fail(e);
		}finally{
			if (activityId>0){ActivityPoolService.removeActivityIdFromPool(activityId);}
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	@Ignore
	public void Tc_GetCatalogListByCatalogIdList_014() {
		Logger.start(true, "微信代购商品，渠道商商品");
		try {
			GodfreightmgrService.deleteBySellerId(rootUserId);
			AddAgentProductBean addAgentProductBean = AddAgentProductCallService.initAddAgentProduct(rootUserId,rootUserName,false);
			String productId = AddAgentProductCallService.AddAgentProduct(addAgentProductBean);

			List<YmtCatalogsI> catalogsIList = new YmtCatalogsIWapper().selectCatalogsByProductId(productId);

			List<String> catalogs = Arrays.asList(catalogsIList.get(0).getsCatalogId(),catalogsIList.get(1).getsCatalogId());
			checkByCatalogsV2(catalogs);
		}catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	@Ignore
	public void Tc_GetCatalogListByCatalogIdList_015() {
		Logger.start(true, "微信代购商品，代理商商品");
		int activityId = 0;
		try {
			AddAgentProductBean addAgentProductBean = AddAgentProductCallService.initAddAgentProduct(rootUserId,rootUserName,true);
			String productId = AddAgentProductCallService.AddAgentProduct(addAgentProductBean);
			ImportAgentProductBean importAgentProductBean = AddAgentProductCallService.initImportAgentProduct(agentUserId1,agentUserName1,productId,rootUserId,false);
			String agentProductId = AddAgentProductCallService.ImportAgentProduct(importAgentProductBean);

			List<YmtCatalogsI> catalogsIList = new YmtCatalogsIWapper().selectCatalogsByProductId(agentProductId);
			List<String> catalogs = Arrays.asList(catalogsIList.get(0).getsCatalogId(),catalogsIList.get(1).getsCatalogId());
			checkByCatalogsV2(catalogs);
		}catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	@Ignore
	public void Tc_GetCatalogListByCatalogIdList_016() {
		Logger.start(true, "微信代购商品，vip渠道->vip1代理->vip2代理，查询vip2代理");
		try {
			AddAgentProductBean agentProductBean = AddAgentProductCallService.initAddAgentProduct(vipRootUserId,vipRootUserName,true);
			String productId = AddAgentProductCallService.AddAgentProduct(agentProductBean);
			ImportAgentProductBean importAgentProductBean = AddAgentProductCallService.initImportAgentProduct(vipAgentUserId1,vipAgentUserName1,productId,vipRootUserId,true);

			String agentProductId = AddAgentProductCallService.ImportAgentProduct(importAgentProductBean);

			ImportAgentProductBean importAgentProductBean1 = AddAgentProductCallService.initImportAgentProduct(vipAgentUserId2,vipAgentUserName2,agentProductId,vipAgentUserId1,false);
			String agentProductId1 = AddAgentProductCallService.ImportAgentProduct(importAgentProductBean1);

			List<YmtCatalogsI> catalogsIList = new YmtCatalogsIWapper().selectCatalogsByProductId(agentProductId1);
			List<String> catalogs = Arrays.asList(catalogsIList.get(0).getsCatalogId(),catalogsIList.get(1).getsCatalogId());
			checkByCatalogsV2(catalogs);

		}catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	@Ignore//商品删除  mongo库数据也会删除
	public void Tc_GetCatalogListByCatalogIdList_017() {
		Logger.start(true, "微信代购商品，渠道商删除商品，无商品数据");
		int activityId = 0;
		try {
			AddAgentProductBean agentProductBean = AddAgentProductCallService.initAddAgentProduct(vipRootUserId,vipRootUserName,true);
			String productId = AddAgentProductCallService.AddAgentProduct(agentProductBean);
			AddAgentProductCallService.DeleteProduct(productId,vipRootUserId);

			List<YmtCatalogsI> catalogsIList = new YmtCatalogsIWapper().selectCatalogsByProductId(productId);
			List<String> catalogs = Arrays.asList(catalogsIList.get(0).getsCatalogId(),catalogsIList.get(1).getsCatalogId());
			checkByCatalogsV2(catalogs);

		}catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	@Ignore//商品删除  mongo库数据也会删除
	public void Tc_GetCatalogListByCatalogIdList_018() {
		Logger.start(true, "微信代购商品，渠道商删除商品，验证下级代理商品数据");
		try {
			AddAgentProductBean agentProductBean = AddAgentProductCallService.initAddAgentProduct(vipRootUserId,vipRootUserName,true);
			String productId = AddAgentProductCallService.AddAgentProduct(agentProductBean);
			ImportAgentProductBean importAgentProductBean = AddAgentProductCallService.initImportAgentProduct(vipAgentUserId1,vipAgentUserName1,productId,vipRootUserId,true);

			String agentProductId = AddAgentProductCallService.ImportAgentProduct(importAgentProductBean);

			ImportAgentProductBean importAgentProductBean1 = AddAgentProductCallService.initImportAgentProduct(vipAgentUserId2,vipAgentUserName2,agentProductId,vipAgentUserId1,false);
			String agentProductId1 = AddAgentProductCallService.ImportAgentProduct(importAgentProductBean1);

			AddAgentProductCallService.DeleteProduct(productId,vipRootUserId);

			List<YmtCatalogsI> catalogsIList = new YmtCatalogsIWapper().selectCatalogsByProductId(agentProductId1);
			List<String> catalogs = Arrays.asList(catalogsIList.get(0).getsCatalogId(),catalogsIList.get(1).getsCatalogId());
			checkByCatalogsV2(catalogs);

			List<YmtCatalogsI> catalogsIList1 = new YmtCatalogsIWapper().selectCatalogsByProductId(agentProductId);
			List<String> catalogs1 = Arrays.asList(catalogsIList1.get(0).getsCatalogId(),catalogsIList1.get(1).getsCatalogId());
			checkByCatalogsV2(catalogs1);

		}catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	@Ignore
	public void Tc_GetCatalogListByCatalogIdList_019() {
		Logger.start(true, "微信代购商品，渠道商下架商品，验证下级代理商品数据");
		try {
			AddAgentProductBean agentProductBean = AddAgentProductCallService.initAddAgentProduct(vipRootUserId,vipRootUserName,true);
			String productId = AddAgentProductCallService.AddAgentProduct(agentProductBean);
			ImportAgentProductBean importAgentProductBean = AddAgentProductCallService.initImportAgentProduct(vipAgentUserId1,vipAgentUserName1,productId,vipRootUserId,true);

			String agentProductId = AddAgentProductCallService.ImportAgentProduct(importAgentProductBean);

			ImportAgentProductBean importAgentProductBean1 = AddAgentProductCallService.initImportAgentProduct(vipAgentUserId2,vipAgentUserName2,agentProductId,vipAgentUserId1,false);
			String agentProductId1 = AddAgentProductCallService.ImportAgentProduct(importAgentProductBean1);

			AddAgentProductCallService.SetOffshelf(productId,vipRootUserId);

			List<YmtCatalogsI> catalogsIList = new YmtCatalogsIWapper().selectCatalogsByProductId(agentProductId1);
			List<String> catalogs = Arrays.asList(catalogsIList.get(0).getsCatalogId(),catalogsIList.get(1).getsCatalogId());
			checkByCatalogsV2(catalogs);
		}catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P1.class)
	@TestCase
	@Ignore
	public void Tc_GetCatalogListByCatalogIdList_020() {
		Logger.start(true, "全球优选商品验证新增字段ProductInCartDto-GlobalProductType");
		int activityId = 0;
		try {
			int sellerId = 20336378;
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerGlobalPspProductRequest(sellerId);
			String productId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ProductManagerCallServiceV2.AddSellerGlobalPspProduct(sellerId, productId, 2);
			List<YmtCatalogsI> catalogsIList = new YmtCatalogsIWapper().selectCatalogsByProductId(productId);

			List<String> catalogs = Arrays.asList(catalogsIList.get(0).getsCatalogId(),catalogsIList.get(1).getsCatalogId());
			//check GetCatalogListByCatalogIdList
			checkByCatalogs(catalogs,0,0,0,false);

		}catch (Exception e) {
			Logger.fail(e);
		}finally{
			if (activityId>0){ActivityPoolService.removeActivityIdFromPool(activityId);}
		}
	}
	@Test
	@Category(P1.class)
	@TestCase
	@Ignore
	public void Tc_GetCatalogListByCatalogIdList_021() {
		Logger.start(true, "全球优选商品验证新增字段ProductInCartDto-MemberProduct");
		int activityId = 0;
		try {
			int sellerId = 20336378;
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerGlobalPspProductRequest(sellerId);
			String productId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			List<YmtCatalogsI> catalogsIList = new YmtCatalogsIWapper().selectCatalogsByProductId(productId);
			Thread.sleep(3000);
			ProductManagerCallServiceV3.SetMemberProduct(productId, sellerId, true);
			List<String> catalogs = Arrays.asList(catalogsIList.get(0).getsCatalogId(),catalogsIList.get(1).getsCatalogId());
			//check GetCatalogListByCatalogIdList
			GetCatalogListByCatalogIdListCall GetCatalogListByCatalogIdListCall=new GetCatalogListByCatalogIdListCall();
			GetCatalogListByCatalogIdListBean GetCatalogListByCatalogIdListBean=new GetCatalogListByCatalogIdListBean();
			GetCatalogListByCatalogIdListBean.setCatalogIdList(catalogs);
			GetCatalogListByCatalogIdListCall.setData(GetCatalogListByCatalogIdListBean);
			GetCatalogListByCatalogIdListCall.callService();
			boolean bMemberProduct = GetCatalogListByCatalogIdListCall.getJsonObject().get("Data").getAsJsonObject().get("ProductList").getAsJsonArray().get(0).getAsJsonObject().get("MemberProduct").getAsBoolean();
			if(!bMemberProduct) {
				Thread.sleep(3000);
				GetCatalogListByCatalogIdListCall.callService();
				bMemberProduct = GetCatalogListByCatalogIdListCall.getJsonObject().get("Data").getAsJsonObject().get("ProductList").getAsJsonArray().get(0).getAsJsonObject().get("MemberProduct").getAsBoolean();
			}
			Logger.verifyEquals(true,bMemberProduct,"验证MemberProduct");

		}catch (Exception e) {
			Logger.fail(e);
		}finally{
			if (activityId>0){ActivityPoolService.removeActivityIdFromPool(activityId);}
		}
	}


	@Test
	@Category(P1.class)
	@TestCase
	@Ignore
	public void Tc_GetCatalogListByCatalogIdList_022() {
		Logger.start(true, "查询限时抢八折后价格");
		try {
			AddAgentProductBean addAgentProductBean = AddAgentProductCallService.initAddAgentProduct(rootUserId,
					rootUserName, false);
			double price = 123.6;
			addAgentProductBean.getCatalogList().forEach(a -> {
				a.getAgentPriceList().forEach(b -> {
					b.setAgentPrice(price);
				});
				a.setDirectPrice(price);
			});
			String productId = AddAgentProductCallService.AddAgentProduct(addAgentProductBean);
			// 创建限时抢购活动
			List<String> catalogList = new ArrayList<String>();
			ProductDetailsDto selectProductDetails = AddAgentProductCallService.selectProductDetails(rootUserId,
					productId);
			selectProductDetails.getCatalogList().forEach(a -> {
				catalogList.add(a.getCatalogId());
			});
			List<String> catalogs = new ArrayList<String>();

			AddactivityBean initProductaddactivity = AgentProductCallService.initProductaddactivity(rootUserId,
					productId, catalogList);
			initProductaddactivity.getProductList().forEach(a -> {
				a.getCatalogList().forEach(b -> {
					catalogs.add(b.getCatalogId());
					b.setDiscount(new BigDecimal("8"));
				});
			});
			int activityId = AgentProductCallService.agentProductaddactivity(initProductaddactivity);
			Thread.sleep(4000);

			JSONObject callAndGetReturnData = getCatalogListByCatalogIdListCall.search(catalogList);
			JSONObject asJsonObject1 = callAndGetReturnData.getJSONObject("Data").getJSONArray("ProductList")
					.getJSONObject(0);
			JSONObject asJsonObject2 = callAndGetReturnData.getJSONObject("Data").getJSONArray("ProductList")
					.getJSONObject(1);
			Logger.verifyEquals(price * 0.8, asJsonObject1.getDouble("Price"), "验证是否为八折价格");
			Logger.verifyEquals(price * 0.8, asJsonObject2.getDouble("Price"), "验证是否为八折价格");
			Logger.verifyEquals(price, asJsonObject2.getDouble("QuotePrice"), "验证规格原价");
			Logger.verifyEquals(price, asJsonObject2.getDouble("QuotePrice"), "验证规格原价");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}


	@Test
	@Category(P1.class)
	@TestCase
	@Ignore
	public void Tc_GetCatalogListByCatalogIdList_023() {
		Logger.start(true, "查询限时抢八折后，代理查询价格，验证规格原价");
		try {
			//代理商查询渠道商的商品

			AddAgentProductBean addAgentProductBean1 = AddAgentProductCallService.initAddAgentProduct(rootUserId,rootUserName,true);
			double price=200;
			addAgentProductBean1.getCatalogList().forEach(a->{
//				a.getAgentPriceList().forEach(b->{
//					b.setAgentPrice(price);
//				});
				a.setDirectPrice(price);
			});
			String productId1 = AddAgentProductCallService.AddAgentProduct(addAgentProductBean1);
			ImportAgentProductBean addAgentProductBean = AddAgentProductCallService.initImportAgentProduct(agentUserId1,agentUserName1,productId1,rootUserId,false);

			addAgentProductBean.getCatalogList().forEach(a->{
//				a.getAgentPriceList().forEach(b->{
//					b.setAgentPrice(price);
//				});
				a.setDirectPrice(price);
			});
			String productId = AddAgentProductCallService.ImportAgentProduct(addAgentProductBean);

			//创建限时抢购活动
			ProductDetailsDto selectProductDetails = AddAgentProductCallService.selectProductDetails(agentUserId1,productId);
			double agentPrice = selectProductDetails.getCatalogList().get(0).getDirectPrice();

			List<String> catalogList =new ArrayList<String>();
			selectProductDetails.getCatalogList().forEach(a->{
				catalogList.add(a.getCatalogId());
			});
			AddactivityBean initProductaddactivity = AgentProductCallService.initProductaddactivity(agentUserId1, productId, catalogList);
			initProductaddactivity.getProductList().forEach(a->{
				a.getCatalogList().forEach(b->{
					b.setDiscount(new BigDecimal("9"));
				});
			});
			int activityId = AgentProductCallService.agentProductaddactivity(initProductaddactivity);

			Thread.sleep(5000);

			JSONObject callAndGetReturnData = getCatalogListByCatalogIdListCall.search(catalogList);
			JSONObject asJsonObject1 = callAndGetReturnData.getJSONObject("Data").getJSONArray("ProductList")
					.getJSONObject(0);
			JSONObject asJsonObject2 = callAndGetReturnData.getJSONObject("Data").getJSONArray("ProductList")
					.getJSONObject(1);
			Logger.verifyEquals(price * 0.9, asJsonObject1.getDouble("Price"), "验证是否为八折价格");
			Logger.verifyEquals(price * 0.9, asJsonObject2.getDouble("Price"), "验证是否为八折价格");
			Logger.verifyEquals(price, asJsonObject2.getDouble("QuotePrice"), "验证规格原价");
			Logger.verifyEquals(price, asJsonObject2.getDouble("QuotePrice"), "验证规格原价");



		} catch (Exception e) {
			Logger.fail(e);
		}
	}



	@Test
	@Category(P1.class)
	@TestCase
	@Ignore
	public void Tc_GetCatalogListByCatalogIdList_024() {
		Logger.start(true, "价格服务增加币种");
		try {
			AddAgentProductBean addAgentProductBean = AddAgentProductCallService.initAddAgentProduct(vipRootUserId,vipRootUserName,true);
			String productId = AddAgentProductCallService. AddAgentProduct(addAgentProductBean);
			Thread.sleep(3000);
			ProductDetailsDto selectProductDetails = AddAgentProductCallService.selectProductDetails(vipRootUserId,productId);
			List<String> catalogList =new ArrayList<String>();
			selectProductDetails.getCatalogList().forEach(a->{
				catalogList.add(a.getCatalogId());
			});
			Thread.sleep(5000);
			JSONObject callAndGetReturnData = getCatalogListByCatalogIdListCall.search(catalogList);
			JSONObject ce = callAndGetReturnData.getJSONObject("Data").getJSONArray("ProductList")
					.getJSONObject(0).getJSONObject("CurrencyExchangeRate");
			Logger.verifyNotNull(ce.getDouble("OnshoreExchangeRate"),"商品标价货币和参考汇率--美元");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}


	@Test
	@Category(P1.class)
	@TestCase
	@Ignore
	public void Tc_GetCatalogListByCatalogIdList_025() {
		Logger.start(true, "境内渠道商查询");
		try {
			AddAgentProductBean addAgentProductBean = AddAgentProductCallService.initAddAgentProduct(500772053,sellerName,false);
			addAgentProductBean.setCurrency("CNY");
			String productId = AddAgentProductCallService.AddAgentProduct(addAgentProductBean);
			Thread.sleep(3000);
			ProductDetailsDto selectProductDetails = AddAgentProductCallService.selectProductDetails(500772053,productId);
			List<String> catalogList =new ArrayList<String>();
			selectProductDetails.getCatalogList().forEach(a->{
				catalogList.add(a.getCatalogId());
			});

			Thread.sleep(5000);
			JSONObject callAndGetReturnData = getCatalogListByCatalogIdListCall.search(catalogList);
			JSONArray ja = callAndGetReturnData.getJSONObject("Data").getJSONArray("ProductList");
			Logger.verifyEquals(true, ja.getJSONObject(0).getBoolean("IsDomestic"), "验证是否境内渠道商品");
			Logger.verifyEquals(true, ja.getJSONObject(1).getBoolean("IsDomestic"), "验证是否境内渠道商品");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	@Ignore
	public void Tc_GetCatalogListByCatalogIdList_026() {
		Logger.start(true, "仅支持自提的商品");
		try {
			int rootUserId = 501465799;
			AddAgentProductBean addAgentProductBean = AddAgentProductCallService.initAddAgentProduct(rootUserId, "",
					true);
			addAgentProductBean.setExpressDelivery(false);
			addAgentProductBean.setMinOrderNum(20);
			String productId = AddAgentProductCallService.AddAgentProduct(addAgentProductBean);
			Thread.sleep(3000);
			ProductDetailsDto selectProductDetails = AddAgentProductCallService.selectProductDetails(rootUserId,productId);
			List<String> catalogList =new ArrayList<String>();
			selectProductDetails.getCatalogList().forEach(a->{
				catalogList.add(a.getCatalogId());
			});
			Thread.sleep(5000);
			JSONObject callAndGetReturnData = getCatalogListByCatalogIdListCall.search(catalogList);
			JSONArray ja = callAndGetReturnData.getJSONObject("Data").getJSONArray("ProductList");
			for (int i = 0; i < ja.length(); i++) {
				JSONObject product = ja.getJSONObject(0);
				Logger.verifyEquals(false,product.getJSONObject("DeliveryPattern").getBoolean("ExpressDelivery"),"验证快递方式");
				Logger.verifyEquals(true,product.getJSONObject("DeliveryPattern").getBoolean("CollectionGoods"),"验证自提");
				Logger.verifyEquals(20,product.getInt("MinOrderNum"),"验证最小起购数量");
			}
		} catch (Exception e) {
			Logger.fail(e);
		}
	}


	@Test
	@Category(P1.class)
	@TestCase
	@Ignore
	//奢品护航新增字段
//	购物车中商品列表（普通购物车中用） /api/Product/GetCatalogListByCatalogIdList com.ymatou.iapi.productquery.testcase.Ts_GetCatalogListByCatalogIdList.Tc_GetCatalogListByCatalogIdList_027()
//	购物车中商品列表（交易隔离中用）/api/Product/GetCatalogListByTradeIsolation
//	多物流购物车接口（普通购物车中用） /api/Product/GetCatalogListByDeliveryExtra
//	多物流购物车接口（交易隔离中用）GetCatalogListByDeliveryExtraIsolation
	public void Tc_GetCatalogListByCatalogIdList_027() {
		Logger.start(true, "奢品护航新增字段");
		int activityId = 0;
		try {
			int sellerId = 20336378;
			AddSellerProductRequest addProdReq =ProductManagerCallServiceV2.initAddSellerGlobalPspProductRequest(3383);
			while(addProdReq.getProduct().getCatalogList().size()>1) {
				addProdReq.getProduct().getCatalogList().remove(0);
			}
			addProdReq.getProduct().getCatalogList().get(0).setPrice(10000);
			addProdReq.getProduct().getCatalogList().get(0).setNewPrice(10000);
			addProdReq.getProduct().getCatalogList().get(0).setVipPrice(10000);
			addProdReq.getProduct().getCatalogList().get(0).setMarketPrice(18000);
			//disconf  luxuryTipsSecondCategoryIds=1087,1130
			addProdReq.getProduct().setSecondCategoryId(1130);
			String pid = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			Thread.sleep(3000);
			List<String> catalogs = ProductManagerCallServiceV2.getCatalogList(pid);
			//check GetCatalogListByCatalogIdList
			GetCatalogListByCatalogIdListCall GetCatalogListByCatalogIdListCall=new GetCatalogListByCatalogIdListCall();
			GetCatalogListByCatalogIdListBean GetCatalogListByCatalogIdListBean=new GetCatalogListByCatalogIdListBean();
			GetCatalogListByCatalogIdListBean.setCatalogIdList(catalogs);
			GetCatalogListByCatalogIdListCall.setData(GetCatalogListByCatalogIdListBean);
			GetCatalogListByCatalogIdListCall.callService();
			String  luxuryTips = GetCatalogListByCatalogIdListCall.getJsonObject().get("Data").getAsJsonObject().get("ProductList").getAsJsonArray().get(0).getAsJsonObject().get("luxuryTips").getAsString();
			Logger.verifyIsContains("拆封鉴别", luxuryTips, "验证luxuryTips");
			GetCatalogListByTradeIsolationCall getCatalogListByTradeIsolationCall = new GetCatalogListByTradeIsolationCall();
			GetCatalogListByCatalogIdListBean.setCatalogIdList(catalogs);
			getCatalogListByTradeIsolationCall.setData(GetCatalogListByCatalogIdListBean);
			getCatalogListByTradeIsolationCall.callService();
			luxuryTips = getCatalogListByTradeIsolationCall.getJsonObject().get("Data").getAsJsonObject().get("ProductList").getAsJsonArray().get(0).getAsJsonObject().get("luxuryTips").getAsString();
			Logger.verifyIsContains("拆封鉴别", luxuryTips, "验证luxuryTips");
		}catch (Exception e) {
			Logger.fail(e);
		}
	}
}
